package com.hhs.storage.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.hhs.storage.bean.Contract;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hhs.storage.bean.InputParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hhs
 * @since 2022-11-30
 */
public interface ContractService extends IService<Contract> {
    //合同录入
    public Map addOrEdit(Contract contract, HttpServletRequest request,String deleIdStr , MultipartFile[] photoList);

    //分页数据查询
    Map<String, Object> getAll(InputParam inputParam) throws IOException, ClassNotFoundException;
    Map<String, Object> query(Contract contract,InputParam inputParam) throws IOException, ClassNotFoundException;
    Map<String, Object> queryBySelfContract(Contract contract,InputParam inputParam) throws IOException, ClassNotFoundException;


    Map dele(String id);

    // 待办工作台预警 业务员角色   查询该用户是否有初审被驳回的合同
    List<Contract> getCheckReturn(String userId);

    // 待办工作台预警 业务员角色   查询是否有快到期的合同
    List<Contract> getExpireCaution(InputParam inputParam);
    // 待办工作台预警 业务员角色   查询是否有临时合同
    List<Contract> getTempContract(InputParam inputParam);

    //设置合同临期不提醒
    void setNoRemind(InputParam inputParam);
    //设置合同截止时间延期
    void setDefer(InputParam inputParam);

}
